/**
 * Created by CHENCO7 on 9/1/2017.
 */
const express = require('express');
const orderController = require('../controllers/order.server.controller');

module.exports = (app) => {
    const router = express.Router();
    router.use(function (req, res, next) {
       console.log("*************************");
       next();
    });

    router.route('/').get(orderController.findAllOrdersByMerchantId);
    router.route('/status/:status').get(orderController.findOrdersByMerchantIdByStatus);
    router.route('/').put(orderController.changeOrderStatusByOrderId);

    app.use('/orders', router);
 };